package com.central.scheduler.common.task.switchtask;

import com.central.common.model.ResourceInfo;
import com.central.scheduler.common.enums.DependentRelation;
import com.central.scheduler.common.task.AbstractParameters;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Tindy
 * @date 2021/11/1
 * @describe
 */
public class SwitchParameters extends AbstractParameters {
    private List<String> nextNode;

    @Override
    public boolean checkParameters() {
        return true;
    }

    @Override
    public List<ResourceInfo> getResourceFilesList() {
        return new ArrayList<>();
    }

    private int resultConditionLocation;
    private List<SwitchResultVo> dependTaskList;

    public int getResultConditionLocation() {
        return resultConditionLocation;
    }

    public void setResultConditionLocation(int resultConditionLocation) {
        this.resultConditionLocation = resultConditionLocation;
    }


    public List<SwitchResultVo> getDependTaskList() {
        return dependTaskList;
    }

    public void setDependTaskList(List<SwitchResultVo> dependTaskList) {
        this.dependTaskList = dependTaskList;
    }

    public List<String> getNextNode() {
        return nextNode;
    }

    public void setNextNode(Object nextNode) {
        if (nextNode instanceof String) {
            List<String> nextNodeList = new ArrayList<>();
            nextNodeList.add(String.valueOf(nextNode));
            this.nextNode = nextNodeList;
        } else {
            this.nextNode = (ArrayList) nextNode;
        }
    }

}
